package 蓝桥真题;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;



public class 天干地支 {
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
       static int n;
       
       public static void main(String[] args) throws IOException {
		      n=Integer.parseInt(br.readLine());
		      String[]tg={"jia","yi","bing","ding","wu","ji","geng","xin","ren","gui"};
		      String[]dz={"zi","chou","yin","mao","chen","si","wu","wei","shen","you","xu","hai"};
		      int t=(6+n%10)%10,d=(8+n%12)%12;
		      System.out.print(tg[t]+dz[d]);
		      
	}
}
